<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
  <title>管理客户</title>
  <link href="../CSS/style.css" rel="stylesheet" type="text/css">
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
  <body>

<table width="584" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td height="27" colspan="6" bgcolor="#EEEEEE" class="tableBorder_gray">
    &nbsp;<span  class="word_deepgrey"> 当前位置：系统设置 &gt; </span>客户档案修改 &gt;&gt;&gt;</td>
  </tr>
    <tr><td >
       <form name="form1"  >
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
  
     <tr height="20">
       <td align="center">
                  客户ID            
        </td>
        <td align="center">
                    客户名
        </td>
        <td  align="center">
                       客户地址
        </td>
       <td align="center">
                      客户手机号            
       </td>
       <td align="center">
       </td>
      </tr>
      <tr>
      <td>
      </tr>
      <c:forEach var="customer" items="${customers}">
        <tr height="20">
        <td align="center">
                    ${customer.customerID }
          <input id="CustomerID" type="hidden" value="${customer.customerID}"/>
        </td>
        <td align="center">
                    ${customer.customerName }
        </td>
       <td align="center">
                       ${customer.customerAddress }            
       </td>
       <td align="center">
                       ${customer.mobileNumber }                        
       </td>
       <td  align="center">
       <input type="button" class="btn_grey" value="修改" onClick="EditCustomer(${customer.customerID})">
         <input type="reset" class="btn_grey" value="删除" onClick="DeleteCustomer(${customer.customerID})">
       </td>
       </tr>
       </c:forEach>
    </table>
    </form>
    </td>
    </tr>
    </table>
  </body>
</html>


<script language="javascript">
function EditCustomer(strCustomerID)
{
    form1.action="/Trade/customerAction.do?method=EditCustomer&CustomerID="+strCustomerID;

    form1.method ="post";
    form1.submit();
}

function DeleteCustomer(strCustomerID)
{
    form1.action="/Trade/customerAction.do?method=DeleteCustomer&CustomerID="+strCustomerID;
    form1.method ="post";
    form1.submit();
}

</script>







